package extrator.svm;

import java.io.IOException;

import config.Config;
import extrator.svm.svmService.*;

public class SVM_Process {
	public static void main(String[] args) {
		train(Config.basePath + "train_sp\\train_Int", Config.basePath + "train_sp\\svm_model");
		
	}
	
	public static void train(String trainFile, String outModelFile) {
		String[] arg = {
				"-t", "2",
				"-c", "10",
				trainFile,
				outModelFile
		};
		
		try {
			svm_train.main(arg);
		} catch(IOException ioEx) {
			ioEx.printStackTrace();
		}
	}
	
	public static void predict(String testFile, String modelFile, String outFile) {
		String[] arg = {
				testFile,
				modelFile,
				outFile
		};
		
		try {
			svm_predict.main(arg);
		} catch(IOException ioEx) {
			ioEx.printStackTrace();
		}
	}
}


